package com.wangy.mapper;

import com.wangy.bean.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * *@Author yyzb
 * *@Date 2024/10/27 15:02
 * *@Version 1.0
 */

@Mapper
public interface RoleMapper {
    @Select("select * from role")
    List<Role> getAllRoles();

    String getUserRoleName(Long userId);

    @Delete("delete from role where id = #{roleId}")
    void deleteRole(Long roleId);

    void addRole(String roleName);
}
